package interfaces;

import java.rmi.Remote;
import java.rmi.RemoteException;
import java.util.ArrayList;

public interface Core extends Remote {
	/**
	 * Returns the Customer Object for the customer by the specified name
	 * 
	 * @param name	Customer name
	 * @return
	 * @throws RemoteException
	 */
	public Customer getCustomer( String name ) throws RemoteException;
	
	/**
	 * Returns the Order for the customer by the specified name
	 * 
	 * @param name	Customer name
	 * @return
	 * @throws RemoteException
	 */
	public Order getOrder( String name ) throws RemoteException;
	
	/**
	 * Adds a Product to the Order for the customer by the specified name
	 * 
	 * @param name		Customer name
	 * @param product	Product
	 * @param amount	Amount
	 * @throws RemoteException
	 */
	public void addToOrder( String name, Product product, int amount ) throws RemoteException;
	
	/**
	 * Removes a Product from the Order for the customer by the specified name
	 * 
	 * @param name		Customer name
	 * @param product	Product
	 * @throws RemoteException
	 */
	public void removeFromOrder( String name, Product product ) throws RemoteException;
	
	/**
	 * Permanently places the order
	 * 
	 * @param name	Customer name
	 * @throws RemoteException
	 */
	public void placeOrder( String name ) throws RemoteException;
	
	/**
	 * Returns a Product from the product list by the specified name
	 * 
	 * @param name		Product name
	 * @return
	 * @throws RemoteException
	 */
	public Product getProduct( String name ) throws RemoteException;
	
	/**
	 * Returns the ProductList
	 * 
	 * @return
	 * @throws RemoteException
	 */
	public ProductList getProductList() throws RemoteException;
	
	/**
	 * Returns a list of Categories
	 * 
	 * @return
	 * @throws RemoteException
	 */
	public ArrayList<Category> getCategories() throws RemoteException;
	
	/**
	 * Returns a Category by the specified name
	 * 
	 * @param name	Category name
	 * @return
	 * @throws RemoteException
	 */
	public Category getCategory( String name ) throws RemoteException;
}
